package com.xbx.admin.controller.dictionary;

import com.xbx.baseweb.controller.BaseController;
import com.xbx.baseweb.controller.ResultUtils;
import com.xbx.baseweb.model.ResponseModel;
import com.xbx.admin.entity.dictionary.res.DictionaryVo;
import com.xbx.admin.service.dictionary.DictionaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 字典查询接口
 *
 * @author 89005691
 * @create 2018-09-04 14:06
 */
@Api(tags = "字典查询接口")
@RestController
@RequestMapping("/dictionary")
public class DictionaryController extends BaseController {

    @Autowired
    private DictionaryService dictionaryService;

    @ApiOperation(value = "查询字典信息列表", httpMethod = "POST", response = DictionaryVo.class)
    @PostMapping(value = "/selectDictionaryList")
    public ResponseModel selectDictionaryList(String dicKey) {

        return ResultUtils.success("list", this.dictionaryService.selectDictionaryList(dicKey));
    }
}
